import request from '@/utils/request'

export interface AppointmentStats {
  totalAppointments: number
  monthlyAppointments: number
  monthlyGrowth: number
  counselorWorkload: {
    counselorName: string
    appointmentCount: number
  }[]
  appointmentTrends: {
    date: string
    count: number
  }[]
  income: {
    date: string
    amount: number
  }[]
}

export function getAppointmentStats(params?: { timeRange?: string }): Promise<AppointmentStats> {
  return request({
    url: '/api/appointment/stats',
    method: 'get',
    params
  })
} 